
import request from '../utils/request'

// 分页查询会员列表
export const findMembers = ({ page = 1, pageSize = 30 } = {}) => request({
    url:'/api/v1/doctor/users',
    methd:'GET',
    params:{
        page,
        pageSize
    }
})

// 注册，添加成员
export const addMembers = user => request({
    url: '/api/v1/doctor/users/list',
    method: 'POST',
    data: user,
    "Content-Type": "multipart/form-data",
})

// 删除成员
export const delMembers = id => request({ 
    url: `/api/v1/doctor/users/${id}`,
    method: 'DELETE',
})

// 添加新成员
export const addMembersFile = user => request({
    url: '/api/v1/doctor/users',
    method: 'POST',
    data: user,
  })

// 修改成员
export const modifyMember = user => request({
    url: '/api/v1/doctor/users',
    method: 'PUT',
    data: user,
  })


//  获取站点信息
export const service = () => request({
    url: 'http://10.7.164.51:10777/services',
    // url: 'http://localhost:10777/services',
    method: 'GET',
})

// 获取所有用户的信息
export const findUser = () => request({
    url: 'http://10.7.164.51:10777/user',
    // url: 'http://localhost:10777/user',
    method: 'GET',
})

// 获取患者档案信息
export const patient = () => request({
    url: 'http://10.7.164.51:10777/patient',
    // url: 'http://localhost:10777/patient',
    method: 'GET',
})

